package com.example.app2024.aidl;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;

import androidx.annotation.Nullable;

public class AIDLService extends Service  //在清单里设为一个进程了
{
      IMyAidlInterface.Stub mStub = new IMyAidlInterface.Stub()
      {

            @Override
            public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException
            {

            }

            @Override
            public String getName(String nickName) throws RemoteException
            {
                  return nickName + "aidl_hahaha";
            }
      };


      @Nullable
      @Override
      public IBinder onBind(Intent intent)
      {
            return mStub;
      }
}